﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ThaiHoa.Win.QLSX.Entity;
using ThaiHoa.Win.QLSX.QLKH.Business;
using ThaiHoa.Win.QLSX.Kho;
using System.Windows.Forms;

namespace ThaiHoa.Win.QLSX.Kho
{
    public class AccessKH
    {
        #region Fields
        Form form;
        //KhoiTao
        TaoMoiHopDong _frmTaoMoiHopDong;
        LenKeHoach _frmTaoMoiKeHoachHopDong;
        #endregion
        // show form ThemMoiHopDong
        public void ShowFormTaoMoiHopDong()
        {
            if (_frmTaoMoiHopDong == null || _frmTaoMoiHopDong.IsDisposed)
            {
                _frmTaoMoiHopDong = new TaoMoiHopDong();
                _frmTaoMoiHopDong.Show();
            }
            else
            {
                _frmTaoMoiHopDong.Activate();
            }
        }

        // show form ThemMoiKeHoachTheoHopDong
        public void ShowFormTaoMoiKeHoachHopDong()
        {
            if (_frmTaoMoiKeHoachHopDong == null || _frmTaoMoiKeHoachHopDong.IsDisposed)
            {
                _frmTaoMoiKeHoachHopDong = new LenKeHoach();
                _frmTaoMoiKeHoachHopDong.Show();
            }
            else
            {
                _frmTaoMoiKeHoachHopDong.Activate();
            }
        }  

        public AccessKH(Form newForm)
        {
            form = newForm;
        }
        public AccessKH()
        { 
        }
    }
}
